<?php
/**
 * @desc 订单详情
 * @author kevin.wang
 * @date 2015-01-01 12:00:00
 */
class orderDetail extends CWidget
{
	public $orderSn;
    public function init()
    {
    }
 
    public function run()
    {
		$request = Yii::app();
		$userInfo = json_decode($request->session['userinfo'], true);
		//获取用户信息
		$user = new User;
		$userData = $user->getUserInfo($userInfo['user_id']);
		//获取订单信息
		$order = new Order;
		$orderInfo = $order->getOrderInfo($this->orderSn, $userInfo['user_id']);
		//获取旅客信息
		$passager = new Passenger;
		$passagerInfo = $passager->getPassagerList($this->orderSn);
        $this->render('orderDetail', array(
				'userData' => $userData,
				'orderInfo' => $orderInfo,
				'passagerInfo' => $passagerInfo
			));
    }
}